package com.lxy.service.impl;

import com.lxy.bean.Permission;
import com.lxy.dao.PermissionMapper;
import com.lxy.generic.GenericDao;
import com.lxy.generic.GenericServiceImpl;
import com.lxy.service.PermissionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("permissionService")
public class PermissionServiceImpl extends GenericServiceImpl<Permission, Integer> implements PermissionService {
	
	@Resource
	private PermissionMapper permissionMapper;
	
	@Override
	public List<Permission> getPermissionByRoleId(Integer id) {
		return permissionMapper.getPermissionByRoleId(id);
	}

	@Override
	public GenericDao<Permission, Integer> getDao() {
		return permissionMapper;
	}

	@Override
	public List<Permission> selectByPId(Integer pId) {
		
		return permissionMapper.getPermissionBypId(pId);
	}

}
